package org.spdata.tsdb.dto;

import java.util.LinkedHashMap;
import java.util.Map;
/**
 * 某个测点的多次采样值
 * @author DELL
 */
public class DataPoints{
	/**
	 * 测点名
	 */
	private String metric;
	
	/**
	 * 测点tag
	 */
	private Map<String,String> tags;
	
	/**
	 * 采样值
	 */
	private Map<String,Number> dps = new LinkedHashMap<String,Number>();
	
	/**
	 * 开始时间
	 */
	private long start;
	
	/**
	 * 结束时间
	 */
	private long end;
	
	public String getMetric() {
		return metric;
	}
	
	public void setMetric(String metric) {
		this.metric = metric;
	}
	
	public Map<String, Number> getDps() {
		return dps;
	}
	
	public void setDps(Map<String, Number> dps) {
		this.dps = dps;
	}
	
	public void addDataPoint(long time,Number value){
		dps.put(Long.toString(time), value);
	}
	
	public long getStart() {
		return start;
	}
	
	public void setStart(long start) {
		this.start = start;
	}
	
	public long getEnd() {
		return end;
	}
	
	public void setEnd(long end) {
		this.end = end;
	}
	
	public Map<String, String> getTags() {
		return tags;
	}
	
	public void setTags(Map<String, String> tags) {
		this.tags = tags;
	}
	
}
